package WordCounterPackage;

import java.util.HashSet;

public class Word {
	private int wcount;
	private HashSet<String> wfiles;
	private String word;
	public Word(String wordname){
		wcount=1;
		wfiles=new HashSet<String>();
		word=wordname;
	}
	public void incCount(){
		wcount++;
	}
	public void addNewFilePath(String filepath){
		if(!wfiles.contains(filepath))
			wfiles.add(filepath);
	}
	public String getWord() {
		return word;
	}
	public String generateFileContent(){
		String content="";
		content+=word+'\u0009'+wcount;
		for (String path:wfiles){
			content+='\u0009'+path;
		}
		return content;
	}
	
}
